Integrated trading platform architecture

ABSTRACT

A system and method that provides a JPeX client that opens up a socket on which it listens for connections from the local host. External applications on the desktop are able to connect to the server socket in the client and use XML to execute commands on the client.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patent application Ser. No. 10/851,923 filed on May 21, 2004, now U.S. Pat. No. 7,770,184, which claims benefit of U.S. Provisional Application No. 60/476,416 filed on Jun. 6, 2003. The entire disclosures of U.S. Provisional Patent Application No. 60/476,416 and U.S. patent application Ser. No. 10/851,923 are incorporated herein by reference.

FIELD OF THE INVENTION

This invention relates to the field of software architecture and, more specifically, to a system and method for integrating an architecture to facilitate interactive trading.

BACKGROUND OF THE INVENTION

Electronic trading of assets is becoming the rule, as opposed to the exception that it was a few short years ago. Many businesses offer one or more client applications for trading purposes. One such client is the JPeX client.

The JPeX client is a web-based, Java applet developed and offered by JPMorganChase to internal and external clients as part of the JP Morgan eXpress™ platform. JP Morgan eXpress™ is JP Morgan's premier electronic trading platform that effects trading across multiple asset classes and across multiple time zones. The platform provides a single point of access to JP Morgan's liquidity in major markets. Key functionality of the web client includes:

-   -   Continuous streaming prices on all instruments;     -   Configurable workspace including market watch and order screens;     -   Downloadable and exportable real time cross asset class trade         blotters;     -   Dynamic Data Exchange (DDE) link to spreadsheets (i.e., Excel)         with real-time prices on all instruments and automated trading         functions;     -   Configurable trading default settings and user preferences; and     -   Straight through processing to settlement eliminating any manual         intervention.

For securities trading, major functionality includes:

-   -   Service available throughout both the London and New York         trading day;     -   Enhanced search function makes it easy to find instruments to         monitor or trade;     -   Click-and-trade functionality with auto-acceptance to ensure         execution times of less than two seconds;     -   Request for Quote functionality that allows the client to ask         for different terms (e.g., larger sizes than those quoted on         screen, irregular settlement location or irregular settlement         date);     -   The option to leave subject orders at a particular level that is         then subject to trader acceptance;     -   Automated hedge functionality when executing credit trades;     -   Multiple account trading—trades can be allocated to sub-accounts         at trade inception;     -   Daily closing prices now available, and     -   Advanced “heat map” research tools with integrated click and         trade functionality.

For foreign exchange trading, key functionality includes:

-   -   Streaming Rates provided for Spot and Swaps;     -   Ability for user to select pre-defined currency pair and to         request a quote directly from a trader;     -   Trading offered during the London and New York day;     -   Ability to trade Spot, Matched and Mismatched Swaps with         standard tenors, Forward outrights, Forward Forwards, Pre-spot         outrights, Broken dated swaps, Pre-spot swap; and     -   Ability for a user to define any currency pair and submit for         request for quote.

The JPeX system is described in the following patents and patent applications: U.S. patent application Ser. No. 10/026,403, entitled “System and Method for Single Session Sign On,” by Lawrence Miller and Martin Trenholm, filed Dec. 21, 2001; U.S. patent application Ser. No. 10/078,687, entitled “System and Method for Single Session Sign-On Management Without Central Server,” by Lawrence Miller and Bruce J. Skingle, filed Feb. 15, 2002; U.S. patent application Ser. No. 10/064,118, entitled “Method and System of Delayed Cookie Transmission In a Client Server Architecture,” by Mike Moore, Lawrence Miller and William Deans, filed Jun. 12, 2002; U.S. patent application Ser. No. 10/064,221, entitled “Method and System for Determining Receipt of a Delayed Cookie In a Client Server Architecture,” by Mike Moore, Lawrence Miller, William Deans and Roman Sulzhyk, filed Jun. 21, 2002; U.S. patent application Ser. No. 10/256,598, entitled “A System and Method for Online Trading Using an Electronic Spreadsheet,” by Brian Lynn and Lawrence Miller, filed Sep. 25, 2002; U.S. patent application Ser. No. 10/065,337, entitled “Data Element Change Across Multiple Instances of Data Base Cache,” by David Chapman, Mike Moore, Lawrence Miller, Zhengrong Chiu, Andy Perterson and Hansen Wang, filed Oct. 4, 2002; and U.S. patent application Ser. No. 10/412/886, entitled “Network Based System For Initiating Or Executing Financial Transactions,” by Lee McGinty, Lawrence Miller, Silvio Oliviero, Brian M Pasierb, Paulo Rodela and Tamara Sablic, filed Apr. 14, 2003; all of which are assigned to the assignee of this patent application and all of which are incorporated by reference in their entirety.

Thus, the JPeX client applet offers a rich set of business logic rules for order submission embedded in its code and its GUI's. Increasingly, efforts are underway to integrate other applications, external to JPeX, with this functionality. To date, the JPeX client has been integrated with a Dynamic Data Exchange (known in the art as “DDE”) server, a JavaScript/HTTP API for opening market watch windows and credit map windows. The JPeX client has also been integrated with a prototype of click-to-trade API, based on JavaScript and HTTP.

All integration efforts to date have proceeded independently of one another. The choice of technologies and solutions has left an increasingly chaotic jumble of specialized code in the JPeX client.

SUMMARY OF THE INVENTION

A system and method that allows software running on a JPeX client system to open a socket on which it listens for connections from the local host. External applications on the desktop are able to connect to the server socket in the JPeX client and use XML to execute commands on the client, for the purpose of initiating end-user interaction activities and workflows, such as those related to trade entry.

In accordance with one aspect of this invention, an applet is executed on a computer for interfacing with multiple client programs that are also executing on the computer. The applet is initiated by a browser-based application executing on the computer. The applet comprises a socket server configured to establish a server socket on a port and receive a connection request via the port from at least one of the multiple client programs. The socket server is also configured to open a socket connection on a different port for communicating with the at least one of the multiple client programs in response to the received connection request. Additionally, the socket server receives a service request on the different port from the at least one of the multiple client programs after the socket connection is opened and outputs the received service request as a passed-on service request.

This aspect of this invention further includes a translation facade configured to receive the passed-on service request outputted from the socket server and parse the passed-on service request, thereby generating a parsed service request if the passed-on service request complies with predetermined rules. The translation facade is also configured to reject the passed-on service request if the passed-on service request does not comply with the predetermined rules and output the parsed service request if generated.

Further, this aspect of this invention includes a processing system configured to receive the parsed service request from the translation facade and process the parsed service request.

Advantageously, the applet further comprises an authentication module configured to authenticate the socket connection after the socket server opens the socket connection.

A method according to another aspect of this invention is for use as an applet initiated by a browser-based application in a computer that interfaces with multiple client programs executing on the computer. The method includes establishing a server socket on a port, receiving a connection request via the port from at least one of the multiple client programs, and opening a socket connection on a different port for communicating with the at least one of the multiple client programs in response to receiving the connection request. The method also includes receiving a service request on the different port from the at least one of the multiple client programs after opening the socket connection and parsing the received service request to generate a parsed service request if the received service request complies with predetermined rules. If the received service request does not comply with the predetermined rules, the received service request is rejected. Otherwise, the parsed service request is processed.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete understanding of this invention may be obtained from a consideration of this specification taken in conjunction with the drawings, in which:

FIG. 1 is a block diagram of a high-level overview of an architecture according to an exemplary embodiment of this invention;

FIG. 2 is an authentication header as used in the architecture of FIG. 1;

FIG. 3 is a screen shot of an “On-Behalf-Of” authentication pop-up dialog box;

FIG. 4 is a sample message to be sent to the JPeX applet of FIG. 1;

FIG. 5 is a MAC of the sample message of FIG. 4;

FIG. 6 is a sample order processing pop-up window;

FIG. 7 is a sample XML request message;

FIG. 8 is a sample XML reply message with a fault;

FIG. 9 is a sample XML asynchronous reply message;

FIG. 10 is an HTML applet tag for use by 3^(rd) party web sites;

FIG. 11 is a deployment cookie controlled library selection code in accordance with an exemplary embodiment of this invention;

FIG. 12 is a method to generate a signed message;

FIG. 13 is a message validation method; and

FIG. 14 is a verified data object according to an exemplary embodiment of this invention.

DETAILED DESCRIPTION

I. Overview

As stated above, this solution for desktop integration centers on using a socket for the communications transport and XML for the messaging format. FIG. 1 illustrates a high-level overview of an architecture according to an exemplary embodiment of this invention, shown generally at 100. New logical components are shown in heavy block lines. Modified logical components are shown in dashed outline. Extant logical components that are not modified by this architecture are shown in dotted outline.

According to this exemplary embodiment, there are three main physical components in this high level overview 100. A computer 102 is connected via an internet interface 104 (operating within computer 102) to the Internet 106. Internet 106 passes data between Internet interface 104 of computer 102 and an application server 108. Application server 108 is illustrated herein as a JPeX core appserver, in accordance with one aspect of this invention. While this invention is described in terms of using the Internet 106 as a data transmission medium, one skilled in the art will appreciate that any data network, public or private, can be employed without departing from the scope of the appended claims. Furthermore, one skilled in the art will appreciate that computer 102 may be a personal computer, laptop, workstation or any other such device without departing from the scope of the appended claims.

In accordance with this exemplary embodiment, a desktop 110, as is known in the art, is operating on computer 102. There are four applications running on desktop 110 that are relevant to this exemplary embodiment: a first instance of an Internet browser 112, a spreadsheet application 114, other external desktop applications 116 and a second instance of an Internet browser 118. Further, a JPeX DDE server 120 is also operating on computer 102 in a manner previously described in the art, and therefore is not further discussed.

According to this exemplary embodiment of this invention, when Internet browser 112 is initialized, it starts a JPeX applet 122. JPeX applet 122 now starts a server socket 124 on a given port. In accordance with this exemplary embodiment, server socket 124 services requests via XML messages. One skilled in the art will realize that the server socket may also service existing DDE socket 128 requests and be able to make such modification, after reading this specification.

Each server socket 124 connection that is opened from a client is authenticated by authentication module 130. This authentication involves a round-trip message 132 to JPeX core appserver 108 via Internet interface 104 and Internet 106. Once authorized, the server socket 124 is free to communicate.

Server Socket 124 delegates XML service requests to a translation façade 134. This logical unit helps to parse the XML, provides some basic sanity checking on the XML and translates the XML into an appropriate action within the JPeX client API 122. Many simple commands are delegated to the existing string-based command mechanism in a command manager 136 for performing simple commands such as opening market watch windows, opening the credit map or opening the workspace.

XML translation façade 134 may hand off more complex requests to a specialized execution engine, as will be the case for order submission. For order submission, a new order parameter sanity checker 138 ensures that the basic order request data is properly formed and reasonable. Order sanity checker 138 forwards the request to the existing workflow engines 140 for processing the order creation request. The order workflows 140 then either directly submit the order or create a new ticket 142.

Outside of the JPeX applet 122, some new pieces are shown in accordance with this exemplary embodiment. For integration with other web sites, such as applet/web page integration, a new applet, the JPeX Link Applet 144, provides communication with server socket 124. For those users that download and install the signed applet code base 122, a small unsigned applet 148 will need to be downloaded from JPeX core Appserver 108. This applet will use code that is part of the signed JPeX client code base 122 to open a connection to the already running JPeX applet 122.

The JPeX link applet 144 comprises a method that takes a string in as an argument (that contains XML) which is passed to the client for processing and returns a string value. Optionally, helper functions or libraries may be provided to help integrators build the XML documents automatically. Communication with JPeX client applet 144 is encapsulated in a new client socket 150 module and a message helper API 152. These modules are distributed with the signed client class files.

In this manner, integrators hoping to use JPeX link applet 144 simply need to embed an applet tag in their page that loads the JPeX link applet 144 from JPeX core appserver 108. They could then use liveconnect to issue commands in javascript to the applet.

Outside of the JPeX applet 122, changes also need to be made for integration into spreadsheet application 114 In this exemplary embodiment, integration with Excel is described. One skilled in the art will appreciate how to integrate this invention with other applications after studying this specification.

The Excel interface currently uses DDE. This is the correct technology for streaming real time market data and order updates and is thus untouched. The current Excel interface also uses DDE requests to submit orders. This functionality is replaced with an Excel java socket handling code 154, which makes connections to JPeX applet 122 and submits XML message requests. Java socket handling code 154 may comprise:

1. Using VBA socket logic or win32 API to make low level calls;

2. using an ActiveX control/COM object to handle communications; or

3. a new Java class using Java Monikers.

II Changes to JPeX Applet 122

The following section goes into more detail about the areas in the JPeX applet 122 that require new modules or changes to develop this proposed solution.

II A Socket Server 124

According to this exemplary embodiment of this invention, JPeX applet 122 includes code to provide a multi-threaded socket server 124, which establishes a server socket (as is known in the art and therefore not further discussed) on a given port and listens for in-coming connection requests. In this exemplary embodiment, a new port that is separate from the DDE server port is selected.

Advantageously, the start listen port is configurable by user preferences. (It is recommended that the current DDE port, 5000, is not used because that port appears to be problematic on Windows XP). No matter what port is selected, if binding fails, an attempt is made to bind to the next highest port number over a series of ports (e.g., 5354-5374). Socket server 124 should report on the port that it binds to. Client programs connecting need to follow a similar protocol (that is, attempt to connect to port 5354, if this fails, connect to the next highest port over the same range).

When a socket connection is opened from socket server 124, it will immediately need to be authenticated before it can be used for general communications or each message arriving will need to be authenticated via a MAC of the sensitive data (the MAC can be immediately verified or passed onto the server for deferred verification). Socket server 124 can delegate this work to authentication module 130.

Socket communication can take place in one of two modes: synchronous or asynchronous. In synchronous mode, the pattern of connecting client-JPeX Applet (server) communication will always be request-reply-request-reply-etc. In asynchronous mode, a given request initiates one or more asynchronous replies on a given established socket connection.

II A 1 Wire Format

The wire format for communicating with socket server 124 requires that, when the socket connection is established, the socket server 124 sends down a handshake data message and the client must immediately reply with a handshake data message of its own. If the handshake fails, the socket server 124 terminates the socket connection.

The byte format of the handshake for both the socket server 124 and the client is:

1. Handshake Length—4 byte integer (this is the length of everything that follows, not including this field)

2. System Name—String/Char data, ASCII Encoded, according to the Java-endian rules.

3. System Id—4 byte int

4. Major Version Id—2 byte short

5. Minor Version Id—2 byte short

6. Connection Mode—1 byte short

Once handshaking is successfully performed, messages can be sent from the connecting client and replies will be sent back from the JPeX applet (server). The byte format for the messages for both the server and the client are:

1. Header Length—4 byte integer (This is the length of the entire header (this field and the next 3 fields))

2. Body Length—4 byte integer (This is the length of the body which is placed at the end)

3. Client Message Id—8 byte long (high hits first)

4. Server Message Id—8 byte long (high bits first)

5. Body content in UTF encoding. The length as specified by the header.

II B Authentication Module

All socket connections are authenticated before other communication can commence on the socket or the content of each message must be secured by a cryptographic MAC. Whenever a message is sent over an un-authenticated connection without authentication credentials or with

bad authentication credentials, the server will reply with a message that contains the following authentication header of FIG. 2.

Currently, four authentication modes are supported:

1. Clear text username/password. The client sends an authentication header that contains the username/password. The username/password are sent as clear text but only over the loop back address which is always implemented as an in-memory RPC on operating systems, so the information never traverses the network. The username/password combination is sent from JPeX applet 122 to the JPeX core appserver 108 for validation. If the combination passes validation, the socket connection will be put into an authenticated state and all further traffic on the socket will be accepted. Otherwise, a challenge message as shown in FIG. 2 will be sent back to the client. To use this authentication mode, a header should be included with a SOAP request to the JPeX applet 122. The header has the following format:

<AuthenticationViaUsernamePassword username=“fbtrader48” password=“abc” force=“true”/>

The “force” attribute can be omitted. It can be set to true if forced re-authentication is desired (n.b., the connection is placed into authenticated mode once it is successfully authenticated).

2. On-Behalf-Of Authentication. In this mode, the connecting client asks the JPeX applet to authenticate the connection. When this mode of authentication is requested, the JPeX applet 122 displays the following username/password dialog of FIG. 3. The username/password combination is sent down from the JPeX applet 122 to the JPeX core appserver 108 for validation. If the combination passes validation, the socket ‘connection will be put into an authenticated state and all further traffic on the socket will be accepted. Otherwise, a challenge message as shown in FIG. 2 will be sent back to the client. To use this authentication mode, a header should be included with a SOAP request to the JPeX client. The header has the following format:

-   -   <AuthenticationViaPopup force=“true”/>

The “force” attribute can be omitted. It is set to be true to force re-authentication (remember that the connection is placed into authenticated mode once it is successfully authenticated).

3. Private Key Nonce-Based Challenge-Response. In this mode, the connecting client uses the contents of the “Nonce” element in the authentication reply header (sent from the JPeX applet 122) and generates a MAC. The MAC combines the nonce data, and a system id using a private key. The MAC data is sent back as the contents of a “Challenge-Response” element. When the JPeX applet 122 then receives the Challenge-Response element, it passes the contents down to the JPeX core appserver 108 for authentication. If the combination passes validation, the socket connection will be put into an authenticated state and all further traffic on the socket will be accepted. Otherwise, a challenge message as shown in FIG. 2 will be sent back to the client. To use this authentication mode, a header should be included with a SOAP request to the JPeX client. The header has the following format:

<ChallengeResponse force=“true”> 6n21FvzE35NCbJoUHBiHXolhnto= </ChallengeResponse>

The “force” attribute can be omitted. It is set to “true” to force re-authentication (remember the connection is placed into authenticated mode once it is successfully authenticated).

4. Message MAC. In this mode, a cryptographic MAC of the data being passed down as the payload of the message is generated every time and included with the data. This mode serves to verify the authentication of each message, but is not enough to place the entire connection into an authenticated state. The check of the MAC can be performed immediately by having the JPeX applet 122 send the MAC to the JPeX core server 108 for verification or can be deferred (for expediency sake) until the server actually processed the MAC-ed data. To use this authentication mode, a MAC needs to be taken of the message body. For example, the message of FIG. 4 may be sent to the JPeX applet. Note that the message is an envelope that contains a header and a body section. When a MAC of the message is sent, in what would be the body of the message, a MAC calculation of it is made and that MAC is sent as a header as in. FIG. 5. A further description of an HMAC authentication mechanism is given in section VII, below.

In all events, all socket connections need to be initially validated. Once validated, all traffic that passes over them is permitted or an individual MAC of the data being sent needs to be calculated and shipped with every request.

II C XML Translation Façade 134

Once a server socket 124 is validated, all message interpretation and command execution is handed off to XML translation facade 134. The job of XML translation façade 134 is to parse XML messages and provide initial validation. XML translation facade 134 rejects messages that fail using a set of well known SOAP fault messages and codes. Once the data has been parsed into a SOAP Envelope structure, XML translation façade 134 then delegates the command for processing to either one of the many existing workflow/command execution API calls in the client 122, to a new order submission or to order ticket workflow 140, 142. XML translation façade 134 also formulates an XML response based on the result of the method invocation and returns that to the socket server for processing.

II D Order Sanity Checker 138

For order processing initiated from requests from the socket server, a new component, the order sanity checker 138, is added to help validate the “form” and “sanity” on incoming order requests.

Integration units such as the Click-To-Trade API, or the current DDE implementation submit order requests (either to open an order ticket or to directly submit an order to the core) that will only have a bare minimum of information present to populate the order. The order sanity checker 138 logical component assesses whether the information passed in from these external integrating applications is enough and of the correct format to place an order or open an order ticket.

The order sanity checker 138 component is comprised of several actual parts. They are:

1. Schema Validation Code. Incoming order submission requests and order ticket requests are checked against publicly available JPeX schema. These XML schemas describe the format of the XML data that must be passed into JPeX Applet 122 in order to either submit an automatic trade or to open an order ticket. The custom validation layer works by parsing the schemas on JPeX core appserver 108 into runtime checking objects. The runtime checking objects are then sent to the JPeX applet 122 where they are used to evaluate hash tables of data. The hash tables of data that they evaluate contain the input parameters from requests made via the JPeX client trading integration API. The schema validation helps check the presence/absence of required data fields, relationships among the keys and the type of data contained in the requests.

2. Sparse Order Validation. Further checks are applied on inbound hash table data. This code can also check the presence/absence of required data fields. In addition, it also checks the request data for the more sophisticated data relationships that are mandated by the different trading models embodied in the JPeX applet 122. It also helps to standardize and normalize the request data into a format suited for processing on the existing JPeX applet 122 and JPeX core appserver 108.

II E Order Workflows 140

Order submission and order ticket creation in JPeX applet 122 are driven by a workflow engine 140. In order to support automatic order submission and order ticket opening from this integration API, the existing workflows were augmented to encompass the above-mentioned order sanity checker 138 logical component. Changes in the order workflow 140 also were made to include the work done for the next section.

II F Order Ticket Display for Sparsely Populated Orders

FIG. 6 illustrates a sample order progress window. This window has a timer bar indicating the expected time left to complete opening the order ticket on the bottom. There is a message on the top to provide users with feedback. The workflows asynchronously update the contents of this window and also close it when the workflows are finished and the GUI order ticket is ready to be displayed.

III Excel Integration

As mentioned above, Excel currently uses a DDE implementation to receive market data and order data updates. This is the correct use of this technology and should not be changed. However, all synchronous communications with the JPeX client applet should be changed to use the new socket connection/XML parsing mechanism.

There are several ways to handle the connectivity to the JPeX client. In accordance with an exemplary embodiment of this invention, the Java code in the “client link socket” module described above is re-used to connect to the applet in the VBA code that makes up the plug-in for Excel that is distributed as part of JPeX. Basically, when the JPeX link is installed, if the Java code for the client link socket module is included, it can be registered and invoked from within VBA using a mechanism called Java Monikers.

IV Assumptions

This solution is based on the assumption that the JPeX client is already up and running. Error handling is provided if the JPeX client is not up and running.

V HMAC Authentication Mechanism

The purpose of section V is to explain the design of the HMAC API Authentication API, which is used to provide application security for the Desktop Integration Interface.

This section includes the following information:

-   -   Explanation of rationale and design of the authentication         mechanism;     -   Cryptographic operations used by the authentication mechanism;     -   Detailed data format; and     -   Definition of API interfaces.         V A Design Overview

The Desktop Integration Interface (DII) offers developers a number of different authentication mechanisms, including username/password-based schemes, an authentication-delegation scheme, and a cryptographic authentication mechanism. This section specifically addresses the cryptographic authentication mechanism.

The DII uses a socket-based communications protocol to allow 3^(rd) party applications to communicate with JPeX applet 122. The types of communications passed over the interface include:

-   -   Requests for the applet to open pre-populated order tickets on         the client's screen;     -   Requests for the applet to send orders to the JPeX core         appserver 108 without user confirmation; and     -   Updates on orders that the user is entitled to view.

These types of operations are, in general, sensitive in nature. Because the DII only allows connections from the client's local machine, anyone connecting to the interface needs to already have access to the user's machine. Additionally, because the connection is made over the loop-back interface, transport level security is not an issue because the connection does not traverse a network (e.g. although the connection is socket-based, it is simply being used as an inter-process communications mechanism).

Nonetheless, it is important to ensure that the interface has a reasonably strong authentication mechanism for two reasons. First, the interface must be protected against accidental cross-connections on multi-user machines (such as Citrix servers), and second, to provide a second line of defense in case a client's machine permits multi-user logins. Of course, no authentication mechanisms can protect this interface (or any interface) if the client's local user account is compromised.

In general, the cryptographic authentication mechanism is intended to provide an authentication mechanism for use by 3^(rd) party applications building integrated offerings that provide some form of trading integration. Typically, these systems will use the DII to pop-up trading tickets for JPeX core appserver 108 users. The authentication mechanism assumes that the 3^(rd) party servers are synchronized to an accurate time source (for instance via NTP).

V B General Message Flows

When a 3^(rd) party application connects to the JPeX DII, a handshake process is initiated. Generally the flow of the process is as follows:

1. 3^(rd) party server generates an authentication message, and sends it over a secure network link to the 3^(rd) party software package running on the client machine.

2. The 3^(rd) party software package opens a socket connection to the JPeX applet 122 DII socket, and sends the authentication message as part of the initial authentication handshake in the DII protocol.

3. JPeX applet 122 receives the authentication message and sends it to the JPeX core appserver 108 for authentication.

4. The JPeX core appserver 108 validates the authentication message and sends a “YES” or “NO” message to the JPeX applet 122.

5. Assuming the message was successfully validated, the connection is put into “authenticated” mode and the applet will then process requests.

V C Cryptographic Authentication Mechanism

The authentication mechanism is based using an RFC-standard HMAC message authentication code with the SHA1.1 hash algorithm, using a 128-bit (16-byte) secret key. The HMAC algorithm takes in an arbitrary length message and, using the keying data, produces a 160-bit authentication code.

In order to verify the connection, the data of Table I is used in the HMAC calculation:

TABLE I Field Name Type Description Version 32-bit signed The version number of the integer (4 bytes) authentication message format. System 32-bit signed An identifier representing the 3^(rd) ID integer (4 bytes) party system which generated the authenticator. This is used to determine which key should be used to validate the HMAC. Principal 32-bit signed The user's principal ID. This is ID integer (4 bytes) used to ensure that a token generated for one user cannot be used to authenticate another user. Timestamp 64-bit signed The time in milliseconds that the integer (8 bytes) authenticator was generated, using the standard Unix time epoch. Used to ensure that a token can only be used for a limited lifetime. Payload 32-bit signed The size of the attached message Size integer (4 bytes) payload, if any Payload Obscure byte An optional message payload array

All integers are stored in network byte order.

The validation process involves the following checks, all of which must pass in order for the message to be considered authentic:

1. The system ID must be valid.

2. The HMAC computed using the key known to correspond to the system ID claimed in the message must match the HMAC included in the authentication mechanism.

3. The principal ID in the message must match that of the JPeX user.

4. The timestamp must be within a permissible range (i.e. less than X milliseconds in the past, and less than Y milliseconds into the future; typically X would be a few minutes, and Y would be a minute or so).

V D Message Format

The message format of Table II is used in generating the HMAC:

TABLE II Version System ID Principal ID Timestamp Payload Size Payload

This set of data is referred to below as the Verified Data. The size of this data is at least 24 bytes (depending on the size of the payload).

Once the HMAC is computed, it is appended to the Verified Data, as shown in Table III, to generate the complete authenticated data package:

TABLE III Verified Data HMAC

The size of the HMAC is 160 bits (20 bytes), so the total size of the authenticator is at least 44 bytes.

V E Programming Interfaces

The authentication API uses the following Java interfaces.

V E 1 Signing a Message

The method of FIG. 12 generates a signed message, including the Verified Data and HMAC, packaged as a byte array.

The inputs to this method are:

-   -   systemID: The numerical System ID assigned to the system         generating the authenticated message;     -   principalID: The principal ID of the user;     -   payload: The payload to be included in the message, if any (null         signifies no payload); and     -   key: The secret key assigned to the system generating the         message.

In general, the resulting byte array will be base 64-encoded by the caller and sent in an authentication message to the client.

V E 2 Validating a Message

To validate a message, the method of FIG. 13 is used.

The inputs to this method are:

-   -   message: The message to be validated;     -   systemKeys: An array of 16-byte keys, each corresponding to the         System ID of the key's array index;     -   principalID: The principal ID of the user session which received         the message;     -   maxAge: The maximum age of timestamps to accept (in         milliseconds); and     -   maxFuture: The maximum amount of time into the future that will         be accepted (in milliseconds).

The method either returns a VerifiedData object, if the data is successfully verified, or it returns a null if the data is not successfully validated. The composition of the VerifiedData object is illustrated in FIG. 14.

It is to be understood that the above-described embodiment is merely illustrative of the present invention and that many variations of the above-described embodiment can be devised by one skilled in the art without departing from the scope of the invention. It is therefore intended that such variations be included within the scope of the following claims and their equivalents. 

What is claimed is:
 1. A method of using an applet initiated by a browser-based application in a computer that interfaces with multiple client programs executing on the computer, the method comprising: establishing a server socket on a port; receiving a connection request via the port from at least one of the multiple client programs; opening a socket connection on a different port for communicating with the at least one of the multiple client programs in response to receiving the connection request; transmitting a handshake data message to the at least one of the multiple client programs after opening the socket connection, wherein the handshake message comprises an authentication message; validating the authentication message; receiving a service request on the different port from the at least one of the multiple client programs after opening the socket connection; parsing the received service request, thereby generating a parsed service request, when the received service request complies with predetermined rules; and processing the parsed service request.
 2. The method according to claim 1, further comprising authenticating the socket connection after opening the socket connection.
 3. The method according to claim 1, wherein at least one of the multiple client programs is a second applet that interfaces with another browser-based application.
 4. The method according to claim 3, wherein the service request has a string message format.
 5. The method according to claim 1, wherein at least one of the multiple client programs is a spreadsheet application.
 6. The method according to claim 1, wherein the parsed service request is in a SOAP (Simple Object Access Protocol) Envelope structure. 